import Vue from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios'
import './plugins/element.js'
import './assets/css/global.css'
import './assets/font_grade/iconfont.css'
import config from './utils/config'
Vue.prototype.$http = axios
    // axios.defaults.headers.post['Content-type'] = 'application/json'

Vue.prototype.$randomdStr = config.randomdStr;

axios.defaults.baseURL = 'https://api.artube.cc'
    // axios.defaults.baseURL = 'http://10.106.44.32:9996'

// http://119.23.53.78:8555/
// http://localhost:8555/
Vue.config.productionTip = false

// 自定义一个全局的时间过滤器
Vue.filter('dateFormat', function(originVal) {
    const dt = new Date(originVal)
    const y = dt.getFullYear()
    const m = (dt.getMonth() + 1 + '').padStart(2, '0')
    const d = (dt.getDate() + '').padStart(2, '0')
    const hh = (dt.getHours() + '').padStart(2, '0')
    const mm = (dt.getMinutes() + '').padStart(2, '0')
    const ss = (dt.getSeconds() + '').padStart(2, '0')
    return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
})

new Vue({
    router,
    render: h => h(App)
}).$mount('#app')